home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / exec / remsemaphore.c < prev    next >
C/C++ Source or Header  |  1996-09-12  |  1KB  |  69 lines

  1. /*
  2.     (C) 1995-96 AROS - The Amiga Replacement OS
  3.     $Id: remsemaphore.c,v 1.4 1996/08/13 13:56:07 digulla Exp $
  4.     $Log: remsemaphore.c,v $
  5.     Revision 1.4  1996/08/13 13:56:07  digulla
  6.     Replaced __AROS_LA by __AROS_LHA
  7.     Replaced some __AROS_LH*I by __AROS_LH*
  8.     Sorted and added includes
  9.  
  10.     Revision 1.3  1996/08/01 17:41:17  digulla
  11.     Added standard header for all files
  12.  
  13.     Desc:
  14.     Lang: english
  15. */
  16. #include "exec_intern.h"
  17.  
  18. /*****************************************************************************
  19.  
  20.     NAME */
  21.     #include <exec/semaphores.h>
  22.     #include <clib/exec_protos.h>
  23.  
  24.     __AROS_LH1(void, RemSemaphore,
  25.  
  26. /*  SYNOPSIS */
  27.     __AROS_LHA(struct SignalSemaphore *, sigSem, A0),
  28.  
  29. /*  LOCATION */
  30.     struct ExecBase *, SysBase, 101, Exec)
  31.  
  32. /*  FUNCTION
  33.     Removes a semaphore from the system public semaphore list.
  34.  
  35.     INPUTS
  36.     sigSem - Pointer to semaphore structure
  37.  
  38.     RESULT
  39.  
  40.     NOTES
  41.     Semaphores are shared between the tasks that use them and must
  42.     therefore lie in public (or at least shared) memory.
  43.  
  44.     EXAMPLE
  45.  
  46.     BUGS
  47.  
  48.     SEE ALSO
  49.  
  50.     INTERNALS
  51.  
  52.     HISTORY
  53.  
  54. *****************************************************************************/
  55. {
  56.     __AROS_FUNC_INIT
  57.  
  58.     /* Arbitrate for the semaphore list */
  59.     Forbid();
  60.  
  61.     /* Remove the semaphore */
  62.     Remove(&sigSem->ss_Link);
  63.  
  64.     /* All done. */
  65.     Permit();
  66.     __AROS_FUNC_EXIT
  67. } /* RemSemaphore */
  68.  
  69.